package com.wanxi.polymorphic.model;

public class DogModel extends Animal {
    public int height = 20;

    public DogModel(int height) {
        this.height = height;
    }

    public DogModel(String name, int age, int height) {
        super(name, age);
        this.height = height;
    }

    /**
     * 重写父类的方法
     */
    @Override
    public void eat() {
        System.out.println("够吃东西");
    }
    public void wangWang(){
        System.out.println("狗叫了");
    }
    public void sleep(){
        System.out.println("猫睡觉");
    }
}
